﻿<UserControl x:Class="TFS.Kanban.Modules.KanbanBoard.Views.Components.Lane"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Components="clr-namespace:TFS.Kanban.Modules.KanbanBoard.Views.Components" xmlns:Controls="clr-namespace:TFS.Kanban.Commons.Controls;assembly=TFS.Kanban.Commons" mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="150">

    <Border BorderBrush="LightGray" BorderThickness="0, 0, 1, 0" VerticalAlignment="Stretch">

        <Controls:DynamicGrid NumColumns="1" NumRows="2" GridUnitType="Auto">

            <TextBlock Grid.Row="0" Text="{Binding Name}" />

            <ItemsControl Grid.Row="1" ItemsSource="{Binding Cards}">

                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel />
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>

                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Components:Card DataContext="{Binding}" />
                    </DataTemplate>
                </ItemsControl.ItemTemplate>

            </ItemsControl>

        </Controls:DynamicGrid>

    </Border>

</UserControl>
